<template>
	<view>
		<view class="bg_head">
			<image class="bg_img" src="../../static/41.png" mode=""></image>
			<view class="user">
				<view class="user1">
					<image v-if="login.avatar == null || login.avatar == ''" src="../../static/11.png" mode=""></image>
					<image v-else :src="login.avatar" mode=""></image>
					<view class="user1_2">
						<view class="user1_1">
							<view>{{login.realname}}</view>
							<view class="fot2">{{login.phone}}</view>
						</view>
						<view  class="fot1">{{login.post}}</view>
					</view>
				</view>
				<view class="user2" @click="qh(8)">个人信息<image src="../../static/53.png" mode=""></image></view>
			</view>
			<!-- <view class="box">
				<view v-for="item in list" v-if="item.query01 == '总佣金'">
					<view class="box_1">{{item.query01}}<image src="../../static/52.png" mode=""></image></view>
					<view class="box_2">{{item.query02}}{{item.query03}}</view>
				</view>
				<view class="box_3" v-for="item in list" v-if="item.query01 != '总佣金'">
					<view>{{item.query01}}</view>
					<view style="font-size: 30rpx;">{{item.query02}}{{item.query03}}</view>
				</view>
			</view> -->
		</view>
		<view class="box2">
			<view class="box2_1" @click="qh(1)">
				<view class="box2_2">
					<image class="img1" src="../../static/46.png" mode=""></image>我的消息
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view>
			<!-- <view class="box2_1" @click="qh(2)">
				<view class="box2_2">
					<image class="img1" src="../../static/47.png" mode=""></image>我的客户
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view>
			<view class="box2_1" @click="qh(10)">
				<view class="box2_2">
					<image class="img1" src="../../static/93.png" mode=""></image>催收中心
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view> -->
			<view class="box2_1" @click="qh(3)">
				<view class="box2_2">
					<image class="img1" src="../../static/48.png" mode=""></image>修改密码
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view>
			<view class="box2_1" @click="qh(8)">
				<view class="box2_2">
					<image class="img1" src="../../static/49.png" mode=""></image>设置
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view>
			<!-- <view class="box2_1">
				<view class="box2_2">
					<image class="img1" src="../../static/50.png" mode=""></image>我的二维码
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view>
			<view class="box2_1">
				<view class="box2_2">
					<image class="img1" src="../../static/51.png" mode=""></image>海报生成
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view> -->
			<view class="box2_1" @click="qh(7)">
				<view class="box2_2">
					<image class="img1" style="height: 38rpx;" src="../../static/82.png" mode=""></image>退出登录
				</view>
				<image src="../../static/40.png" mode=""></image>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				login:'',
				list:[]
			}
		},
		onShow() {
			this.initial()
		},
		mounted() {
			console.log(this.$headUrl)
			this.initial()
		},
		methods: {
			qh:function(type){
				if(type == 1){
					uni.navigateTo({
						url:'../msg/msg'
					})
				}else if(type == 2){
					uni.navigateTo({
						url:'../yewu_order/yewu_order?type=' + 'qbdd'
					})
				}else if(type == 3){
					uni.navigateTo({
						url:'../xiugai_password/xiugai_password'
					})
				}else if(type == 4){
					uni.navigateTo({
						url:'../yewu_order/yewu_order?type=' + 'dsp'
					})
				}else if(type == 5){
					uni.navigateTo({
						url:'../yewu_order/yewu_order?type=' + 'dqy'
					})
				}else if(type == 6){
					uni.navigateTo({
						url:'../yewu_order/yewu_order?type=' + 'htj'
					})
				}else if(type == 7){
					uni.showModal({
					    title: '提示',
					    content: '狠心离开?',
					    success: (res) => {
					        if (res.confirm) {
								this.$get('sys/logout',{
									mobile: this.phone,
									smsmode: 2
								}).then((res)=>{
									uni.showToast({
										title: res.data.message,
										icon:'none'
									})
									uni.setStorageSync('token', '');
									uni.setStorageSync('login', '');
									if(res.data.success == true){
										setTimeout(()=>{
											uni.reLaunch({
												url:'../login/login'
											})
										},1000)
									}
								})
					        } else if (res.cancel) {
					            console.log('用户点击取消');
					        }
					    }
					});
				}else if(type == 8){
					uni.navigateTo({
						url:'../geren_xinxi/geren_xinxi'
					})
				}else if(type == 9){
					uni.navigateTo({
						url:'../yewu_order/yewu_order?type=' + 'yfk'
					})
				}else if(type == 10){
					uni.navigateTo({
						url:'../cszx/cszx'
					})
				}
				
			},
			initial:function(){
				this.$get('sys/appgetuserinfo').then((res)=>{
					uni.setStorageSync('login',res.data.result.userInfo)
					this.login = uni.getStorageSync('login')
					console.log(res.data.result.userInfo)
				})
				this.$get('report/fxjReport_03/list').then((res)=>{
					console.log(res.data.result.records,99999)
					this.list = res.data.result.records
				})
				
			}
		}
	}
</script>

<style>
	
	.img1{
		width: 42rpx;
		height: 42rpx;
		margin-right: 25rpx;
	}
	.box2_2{
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.box2_1>image{
		width:17rpx;
		height:29rpx;
	}
	.box2_1{
		height: 110rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1px solid #F2F2F2;
	}
	.box2{
		width: 92%;
		margin: 0 auto;
		margin-top: 80rpx;
		margin-bottom: 100rpx;
		background:rgba(255,255,255,1);
		box-shadow:0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
		border-radius:10rpx;
		padding: 0 20rpx;
		box-sizing: border-box;
	}
	.box1_1>image{
		width: 60rpx;
		height: 60rpx;
	}
	.box1_1{
		font-size:24rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(51,51,51,1);
		text-align: center;
		
	}
	.box1{
		width:92%;
		height:180rpx;
		background:rgba(255,255,255,1);
		box-shadow:0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
		border-radius:10rpx;
		margin: 0 auto;
		margin-top: 20rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
	}
	.box_3{
		font-size:26rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,255,255,1);
		margin-bottom: 10rpx;
	}
	.box_2{
		font-size:48rpx;
		font-family:PingFang SC;
		font-weight:bold;
		color:rgba(255,255,255,1);
	}
	.box_1>image{
		width: 32rpx;
		height: 20rpx;
		margin-left: 20rpx;
		vertical-align: middle;
	}
	.box_1{
		font-size:30rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,255,255,1);
		margin-bottom: 20rpx;
	}
	.box{
		padding: 0 52rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		align-items: flex-end;
	}
	.user2>image{
		width: 15rpx;
		height: 24rpx;
		margin-left: 11rpx;
	}
	.user2{
		width:150rpx;
		height:50rpx;
		background:rgba(255,255,255,0.3);
		box-shadow:0rpx 8rpx 29rpx 1rpx rgba(0, 0, 0, 0.1);
		border-radius:25rpx 0rpx 0rpx 25rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size:24rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,255,255,1);
	}
	.user1_1{
		font-size:36rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,255,255,1);
	}
	.fot2{
		font-size:26rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,255,255,1);
		margin-top: 16rpx;
	}
	.user1_2{
		display: flex;
	}
	.fot1{
		width:120rpx;
		height:40rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background:linear-gradient(120deg,rgba(58,98,255,1),rgba(86,157,255,1));
		border-radius:16rpx;
		font-size:18rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,255,255,1);
	}
	.user1>image{
		width: 120rpx;
		height: 120rpx;
		margin-right: 20rpx;
		border: 4rpx solid #FFFFFF;
		border-radius: 50%;
	}
	.user1{
		font-size:36rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(255,255,255,1);
		display: flex;
		align-items: center;
	}
	.user{
		padding-left: 30rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 40rpx;
	}
	.bg_img{
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		z-index: -1;
	}
	.bg_head{
		height: calc(var(--status-bar-height) + 250rpx);
		position: relative;
		z-index: 10;
		padding-top: calc(90rpx + var(--status-bar-height));
	}
</style>
